<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>上传头像</title>
</head>
<body>
    <h1>上传头像</h1>
    <form th:action="@{/students/upload/{id}(id=${studentId})}" method="post" enctype="multipart/form-data">
        <div>
            <label>选择图片：</label>
            <input type="file" name="photo" accept="image/*" required>
        </div>
        <button type="submit">上传</button>
    </form>
    <br>
    <a th:href="@{/teachers/}">返回列表</a>
</body>
</html> 